﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="wuc_view_car.ascx.cs"
    Inherits="CarLoanSystemWeb.Page.CarInfo.wuc_view_car" %>
<%@ Register Assembly="AjaxValidationSummary" Namespace="AjaxValidationSummary" TagPrefix="cc4" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<style type="text/css">
    .style5
    {
        font-size: small;
    }
    .style6
    {
        width: 175px;
        font-size: small;
    }
    .style21
    {
        width: 7px;
        height: 5px;
    }
    .style22
    {
        height: 5px;
    }
    .style23
    {
        width: 140px;
        height: 19px;
    }
    .style24
    {
        width: 7px;
        height: 19px;
    }
    .style25
    {
        height: 19px;
    }
    .style26
    {
        width: 118px;
        height: 5px;
    }
    .style27
    {
        width: 240px;
    }
</style>
<script type="text/javascript" language="javascript">
    function ValidateText(i) {
        if (i.value.length > 0) {
            i.value = i.value.replace(/[^\d+.\d*$]+/g, '');
        }
        var pattern = /^\d+.?\d*$/;
        var str = i.value;
        if (str.match(pattern) == null) {
            alert("กรุณากรอกข้อมูลให้ถูกต้อง");
            i.value = "0";
        }
    }
</script>
<div id="box_content">
    <div id="box_content_head">
        <h1>
            ข้อมูลรถยนต์
        </h1>
    </div>
    <div id="box_content_body">
        <table style="height: 63px; width: 779px">
            <tr>
                <td class="style23">
                    <span class="style5">ยี่ห้อรถยนต์</span>
                </td>
                <td class="style24">
                    :
                </td>
                <td class="style25">
                    <asp:TextBox ID="txtBrandName" runat="server" MaxLength="100" Width="200px" 
                        Style="margin-left: 0px" Enabled="False"></asp:TextBox>
                </td>
                <td class="style26">
                    <span class="style6">รุ่นรถยนต์</span>
                </td>
                <td class="style21">
                    :
                </td>
                <td class="style22">
                    <asp:TextBox ID="txtModelName" runat="server" MaxLength="100" Width="200px" 
                        Enabled="False"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style23">
                    <span class="style5">ชนิดเครื่องยนต์</span>
                </td>
                <td class="style24">
                    :
                </td>
                <td class="style25">
                    <asp:TextBox ID="txtTypeEngine" runat="server" MaxLength="100" Width="200px" Style="margin-left: 0px"
                        onkeyup="ValidateText(this);" Enabled="False"></asp:TextBox>
                </td>
                <td class="style26">
                    <span class="style6">ราคา</span>
                </td>
                <td class="style21">
                    :
                </td>
                <td class="style22">
                    <table>
                        <tr>
                            <td>
                                <asp:TextBox ID="txtPrice" runat="server" MaxLength="100" Width="198px" 
                                    onkeyup="ValidateText(this);" Enabled="False"></asp:TextBox>
                            </td>
                            <td>
                                <span class="style6">บาท</span>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
                <table style="width: 781px">
                    <tr>
                        <td class="style23">
                            <span class="style5">รายละเอียดรถยนต์</span>
                        </td>
                        <td class="style24">
                            :
                        </td>
                        <td class="style25">
                            <asp:TextBox ID="txtCarDetail" runat="server" MaxLength="100" Width="615px" Style="margin-left: 0px"
                                Height="167px" TextMode="MultiLine" Enabled="False"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </tr>
            <tr>
                <table style="width: 781px; margin-top: 43px;">
                    <tr>
                        <td class="style27">
                        </td>
                        <td>
                            <asp:Image ID="Image1" runat="server" ImageUrl="" />
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
            </tr>
        </table>
    </div>
    <div id="box_content_footer">
    </div>
    <div class="action" style="margin-top: 15px">
        <asp:HyperLink ID="hplBack" runat="server" CssClass="button cancel" NavigateUrl="~/Page/CarInfo/CarInfoPage.aspx">ยกเลิก</asp:HyperLink>
    </div>
</div>
